package Euler19;

import java.util.*;

public class CountingSundays {
	public static void main(String[] args) {
		int year = 1;
		int count = 0;
		Date date = new Date();
		
		date.setDate(1);
		while(year<101)
		{
			date.setYear(year);
			for(int i = 0; i <=11; i++)
			{
				date.setMonth(i);
				
				if(date.getDay()==Calendar.SUNDAY-1)
				{
					count++;
					System.out.println(date);
				}
			}
			year++;
		}
		
		System.out.println(count);
	}
}
